<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
    <meta charset="UTF-8">
    <title>全球新冠病毒实时数据统计</title>
</head>
<body>
<div id="container">
    <div >
        <h1 th:text="'全球新冠病毒感染总病例数:'+${allPeople}"></h1>
        <h4 th:text="'全球新冠病毒新增病例数:'+${allNewPeople}"></h4>
    </div>
    <form action="/select" method="post">
        地区：<input type="text" th:name="state"/> <br>
        国家：<input type="text" th:name="country"/><br>
        <input type="submit" value="查询">&nbsp&nbsp
        <input type="reset" value="重置"/>
        <br>
    </form>
    <table border="1px" cellspacing="0px"  style="text-align: center" >
        <tr>
            <th>地区</th>
            <th>国家</th>
            <th>总感染病例数</th>
            <th>新增感染病例数</th>
        </tr>
        <tr th:each="data:${data}">
            <th th:text="${data.state}"></th>
            <th th:text="${data.country}"></th>
            <th th:text="${data.latestTotalCases}"></th>
            <th th:text="${data.diffFromPrevDay}"></th>
        </tr>
    </table>
</div>
</body>
</html>